﻿namespace Guia.Elements.PatternServants
{
    using Guia.Core;

    /// <summary>
    /// Represents the interface for the Toggle-Pattern.
    /// </summary>
    public interface IToggle
    {
        /// <summary>
        /// Gets a value indicating whether the state is off or not.
        /// </summary>
        bool IsOff { get; }

        /// <summary>
        /// Gets a value indicating whether the state is on or not.
        /// </summary>
        bool IsOn { get; }

        /// <summary>
        /// Gets a value indicating whether the state is indeterminate or not.
        /// </summary>
        bool IsIndeterminate { get; }

        /// <summary>
        /// Toggles the UiElement.
        /// </summary>
        /// <exception cref="OperationNotSupportedException">This exception is thrown when the toggle-action is not supported in the current context (e.g. the UiElement is disabled).</exception>
        void Toggle();
    }
}
